import request from '@/plugins/axios'

export const uploadImage = async (file: File): Promise<string> => {
  const fd = new FormData()
  fd.append('file', file)
  const resp = await request({
    url: 'admin/upload/image',
    method: 'post',
    data: fd
  })
  return resp.url
}
